package com.etoak.web.sys_menu.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

/**
 * @Author by 孙有泽
 * @Date 2025/2/20 16:42
 * @Description
 */
@TableName("menu")
@Data
public class SysMenu {
    @TableId(type = IdType.AUTO)
    private String id;
    private String title;
    private String url;
    private String pid;
    private Integer type;
    private Integer sort;
    private String path;
    private String pidname;
    private String code;
    private String name;
    private String icon;
    @TableField(fill = FieldFill.INSERT,value ="createTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE,value ="updateTime")
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
    private Date updateTime;
    @TableLogic(value = "0",delval = "1")
    private Integer deleted;
    @TableField(exist = false)
    private  List<SysMenu> children=new ArrayList<>();
    @TableField(exist = false)
    private String value;
    @TableField(exist = false)
    private String label;
}
